﻿using DDD.Simple.DomainBase;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Dealer.Domain.AggregateModels.DealerAggregate
{
    public class Contact
        : IValueObject
    {
        public string Code { get; set; }
        public Guid Id { get; set; }
        public bool IsDefault { get; set; }
        public string ContactMobile { get; set; }
        public string ContactName { get; set; }
        public string Province { get; set; }
        public string City { get; set; }
        public string District { get; set; }
        public string Street { get; set; }
        public Guid DealerId { get; set; }
        public Contact CreateContact(string mobile,string name,string province,string city,string district,string street,
            Guid dealerId,bool isDefault)
        {
            Id = Guid.NewGuid();
            Code = $"Code{name}";
            ContactMobile = mobile;
            ContactName = name;
            Province = province;
            City = city;
            District = district;
            Street = street;
            IsDefault = isDefault;

            return this;
        }
    }
}
